std.typecons.RefCounted, std.container.array.Array, & similar structs that manage their own memory do not need to be scanned unless GC-allocated memory is reachable through them#7923
Conversation
|
Thanks for your pull request, @n8sh! Bugzilla references
Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + phobos#7923" |
|
I suggest using UDA as the API for type author to override the default policy: import core.memory : GC;
@(GC.ShouldScan.no)
struct MyType
{
// ...
} |
|
@n8sh Please add the word "Fix" at the beginning of your commit message so that the bot understands that you are actually fixing the issue. |
|
BTW, we should check if |
|
ping @n8sh |
|
@RazvanN7 recently I was traveling. Updated commit message as requested. |
|
Would be nice with a short description what it does and why it's needed. Like pseudo Why? Improve performance... etc |
@PetarKirov Is there a way to do this conditionally from inside the definition of the struct? |
@Imperatorn did you see the comment above
Bear in mind that this template is not public so the explanation is written for Phobos developers. |
If template Mytype(T)
{
alias whatever = logic goes here;
@whatever
struct MyType { ... }
}not sure about for a non-template |
… & similar structs that manage their own memory do not need to be scanned unless GC-allocated memory is reachable through them
|
@n8sh is it possible that this could fix this issue: dlang-community/libdparse#387 (comment) ? |
|
@n8sh how should we proceed here? |
No description provided.